
class BaseEntity<T>{
  /*
  {"code":"0000","message":"request.success","result":
  {"userId":1284,"nickname":null,"gender":1,"birthday":null,"age":null,"countryId":null,"level":0,"friendNum":0,"fansNum":0,"upsNum":0,"videoPrice":400,"icon":null,"diamondNum":0,"userType":1,"valid":2,"userTagType":null,"disturbStatus":null,"token":"830B8374F9764FF48BDDB99280D2693E","yxAccid":null,"imToken":null,"vip":0,"isFirstCharge":true,"canGetDiamond":false,"anchorIncomeMap":null,"storeUrl":"","vipExpireMs":1677662011759,"onReview":false,"new":true}
  }
  * */

  // dynamic code;
  // dynamic  msg;
  // dynamic data;

  @override
  String toString() {
    return 'BaseEntity{code: $code, msg: $message, data: $result}';
  }
  // BaseEntity(this.code, this.msg, this.data,);

  dynamic code;
  String message;
  dynamic result;

  BaseEntity(this.code, this.message, this.result);

  BaseEntity.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    result = json['result'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['message'] = this.message;
    data['result'] = this.result;
    return data;
  }
}